set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Agurto, Jorge>
-- Create date: <28/10/2011>
-- Description:	<Trae postnets por filtro>
-- =============================================
CREATE PROCEDURE [GOOGLECODERS].[getPostenets]
	@Marca varchar(50) = '',
	@Modelo varchar(50) = '',
	@NroSerie int = 0
AS
BEGIN
	SET NOCOUNT ON;

	SELECT IdPostnet,
			Marca,
			Modelo
	FROM Postnet
	WHERE (Marca like '%'+@Marca+'%' or @Marca = '' )
	AND (Modelo like '%'+@Modelo+'%' or @Modelo = '')
	AND (IdPostnet = @NroSerie or @NroSerie = 0)
END